package com.llkj.contractmanagement.contractmanagement.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.llkj.contractmanagement.R;
import com.llkj.contractmanagement.model.ContractListBean;

import java.util.List;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * author: dong.yj
 * created on: 2016/8/17 16:46
 * description:合同分类的子分类页面
 */
public class ChildrenContractClassifyAdapter extends CommonBaseAdapter<ChildrenContractClassifyAdapter.ViewHolder,ContractListBean.HtlistBean>{


    public ChildrenContractClassifyAdapter(Context context, List<ContractListBean.HtlistBean> list) {
        super(context, list);
    }

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int position) {
        return new ViewHolder(inflate(R.layout.lv_contract_classify_item, null));
    }

    @Override
    public void onBindViewHolder(ViewHolder holder, int position) {
        ContractListBean.HtlistBean htlistBean = mList.get(position);
        holder.tv_contract_name.setText(htlistBean.getName());
    }

    static class ViewHolder extends CommonBaseAdapter.ViewHolder {

        @Bind(R.id.tv_lv_item_name)
        TextView tv_contract_name;


        public ViewHolder(View view) {
            super(view);
            ButterKnife.bind(view);
        }
    }
}
